﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.controllers {
    import flash.utils.*;
    import net.wooga.pets.events.*;
    import net.wooga.pets.interfaces.*;
    import org.robotlegs.mvcs.*;
    import net.wooga.pets.models.world.*;

    public class RemoveAllActorsCommand extends Command {

        public var worldModel:WorldModel;

        override public function execute():void{
            var _local2:IActing;
            var _local1:Dictionary = this.worldModel.actors;
            for each (_local2 in _local1) {
                if ((_local2 is ITicking)){
                    dispatch(new TickingEvent(TickingEvent.REMOVE_TICKING, (_local2 as ITicking)));
                };
                this.worldModel.removeActor(_local2.id);
            };
        }

    }
}//package net.wooga.pets.controllers 
